public class Hui {
    public static void main(String[] args){
       String  s ="abcdefg";
       String a = "cdfsa";
        System.out.println("1:"+s.indexOf("a"));
        System.out.println("2:"+s.lastIndexOf("a"));
        System.out.println("3:"+s.charAt(3));
        System.out.println("4:"+s.endsWith(s));
        System.out.println("5:"+s.length());
        System.out.println("6:"+s.isEmpty());
        System.out.println("7:"+s.equals(a));
        System.out.println("8:"+s.startsWith("a"));
        System.out.println("9:"+s.contains("cd"));
        System.out.println("10:"+s.toLowerCase());
        System.out.println("11:"+s.toUpperCase());
        System.out.println("12:"+s.toCharArray());
        System.out.println("13:"+s.replace("cd","wc"));
        System.out.println("14:"+s.split("d"));
        System.out.println("15:"+s.substring(3));
        System.out.println("16:"+s.substring(4,6));
        System.out.println("17:"+s.trim());

    }
}



